package console

import (
	"os"
)

type closeCommand struct {
	CloseSignal chan<- os.Signal
}

func (command *closeCommand) Name() string {
	return "close"
}

func (command *closeCommand) Help() string {
	return "close leaf process"
}

func (command *closeCommand) Run([]string) string {
	command.CloseSignal <- os.Interrupt

	return ""
}
